﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hrm.Core
{
    public class PageResponse<T>
    {
        public PageResponse(IEnumerable<T> data, int draw,int start,int length)
        {
            this.recordsTotal = data.Count<T>();
            this.data = data.Skip(start).Take(length).ToList();
            this.draw = draw;
            this.recordsFiltered = this.recordsTotal;
        }

        public IEnumerable<T> data { get; set; }

        public int draw { get; set; }

        public int recordsTotal { get; set; }

        public int recordsFiltered { get; set; }

    }
}
